package com.ruoyi.driver.warning.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.management.basics.controller.BaseExtController;
import com.ruoyi.management.warning.domain.TWarning;
import com.ruoyi.management.warning.ro.GetWarningPageParam;
import com.ruoyi.management.warning.service.ITWarningService;
import com.ruoyi.management.warning.vo.GetWarningPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
 * warningController
 * 
 * @author ruoyi
 * @date 2021-12-21
 */
@RestController
@Api(tags = "驾驶员端告警管理")
@RequestMapping("/warning/warning")
public class WarningDriverController extends BaseExtController
{
    @Autowired
    private ITWarningService tWarningService;

    /**
     * 新增警告
     */
    @PostMapping("/add")
    @ApiOperation("驾驶员端新增警告")
    public AjaxResult add()
    {
        return toAjax(tWarningService.insertTWarning(getLoginUser().getUsername()));
    }

}
